<div class="navbar navbar-inverse" role="navegation">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
                <span class="sr-only">Opções</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <span class="navbar-brand" rel="home" href="#">
                Yap
            </span>
        </div>
        <div class="collapse navbar-collapse navbar-ex1-collapse">
            <div class="col-sm-6 col-md-6">
                <form class="navbar-form" role="search" method="get" 
                      action="<?php echo base_url('./index.php/conta/pesquisa'); ?>">
                    <div class="input-group">
                        <input type="text" class="form-control" placeholder="Pesquisar..." 
                               id="pesquisa" name="pesquisa" value="" required="">
                        <div class="input-group-btn"><button type="submit" class="btn btn-primary">
                                <span class="glyphicon glyphicon-search"></span></button>
                        </div>
                    </div>
                </form>
            </div>
            <ul class="nav navbar-nav">
                <li>
                   <a href="<?php echo base_url('index.php/conta/historico') ?>" title="Histórico">
                         <span class="glyphicon glyphicon-book"></span> Histórico
                     </a>
                </li>
                 <li>
                     <a href="<?php echo base_url('index.php/postagem') ?>" title="Início">
                        <span class="glyphicon glyphicon-home"></span> Início
                     </a>
                </li>
                 <li>
                     <a href="<?php echo base_url('index.php/contaseguindo') ?>" title="Seguindo">
                          <span class="glyphicon glyphicon-tags"></span> Seguindo
                     </a>
                </li>
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" 
                       style="<?php if ($this->session->userdata('Foto')) { echo 'padding-bottom: 0px;padding-top: 2px;';}else {echo '';} ?>">
                         <?php if ($this->session->userdata('Foto')) { ?>
                            <img src="<?php echo base_url('UploadImg/Perfil/' . $this->session->userdata('Foto') . '.jpg') ?>" height="50" >
                        <?php } else { ?>
                            <span class="glyphicon glyphicon-user"></span> 
                        <?php } ?>                        
                            <?php echo $this->session->userdata('Nome') ?></a>
                    <ul class="dropdown-menu">
                        <li><a href="<?php echo base_url("index.php/conta/editar") ?>">Editar</a></li>
                        <li><a href="<?php echo base_url("index.php/conta/logoff") ?>">Sair</a></li>
                    </ul>
                </li>
            </ul>
        </div>
    </div>
</div>